-#
  Copyright 2008 Garth Williams

  This file is part of CommandPost.

  CommandPost is free software: you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation, either version 3 of the License, or
  (at your option) any later version.

  CommandPost is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with CommandPost.  If not, see <http://www.gnu.org/licenses/>.


%h1 Update Details

= error_messages_for :user

- form_for :user, :url => users_path do |f|
  %p
    %label{:for =>'name'} Display Name
    %br
    = f.text_field :name
  %p
    %label{:for => 'email'} Email
    %br
    = f.text_field :email
  - if (current_user == @user)
    %p
      %label{:for => 'password_current'} Current Password
      %br
      = password_field_tag 'password_current'
  .small
    (Leave new password and confirmation blank keep existing password)
  %p
    %label{:for => 'password'} New Password
    %br
    = password_field_tag 'password'
  %p
    %label{:for => 'password_confirmation'} Confirm New Password
    %br
    = password_field_tag 'password_confirmation'
  %p
    = submit_tag 'Save Changes', :class => 'button'
